Skip to content

DEV-1291: Android HIL counts inStream's replies over BLE too - #139

Merged
JongChern merged 1 commit into
masterfrom
DEV-1291_android_hil_ble_reply_count
Oct 24, 2026
Merged

JongChern merged 1 commit into
masterfrom
DEV-1291_android_hil_ble_reply_count

Conversation

@JongChern

Copy link
Copy Markdown
Contributor

Test code only. inStream miscounted replies over BLE, so it failed on every BLE run.

The bug

inStream counts the battery and status replies it gets from the phone's log, by the line Android's own Classic parser writes, such as IN STREAM: VBATT_RESPONSE. Over BLE the driver's parser runs instead, and it words them In-stream received = [0x94] VBATT_RESPONSE. So every BLE run reported 0 replies to 15 reads and failed, although the driver logged all of them. It now counts each transport's own line.

Tested

s3r-2f31 (Shimmer3R, LogAndStream v1.1.22) over BLE, from an M2101K6G phone on Android 11, at the default 2-byte CRC:

Driver Battery replies Status replies Command timeouts Parser errors
0.11.9_beta (no DEV-1291 fix) 15 of 15 15 of 15 0 0
0.11.11_beta 15 of 15 15 of 15 0 0

Before this change, both runs reported 0 of 15 replies.

So DEV-1291, an ACK arriving in the pause after a logging stop, doesn't happen over BLE. There the driver queues these reads, and none was answered in a pause.

Both runs still fail on a timestamp that doesn't increase after an SD logging start while streaming. That's the Shimmer3R firmware's DEV-1245, which v1.1.22 was meant to fix. It isn't caused by this change.

🤖 Generated with Claude Code

inStream counts the battery and status replies it gets from the log, by the
lines Android's own Classic parser writes ("IN STREAM: VBATT_RESPONSE").
Over BLE the driver's parser runs instead, and it words them
"In-stream received = [0x94] VBATT_RESPONSE", so every BLE run reported 0
replies to 15 reads and failed, although the driver logged all of them. It
now counts each transport's own line.

With that, inStream over BLE on a Shimmer3R decoded 15 of 15 battery and 15
of 15 status replies, with no command timeout or parser error, on driver
0.11.9_beta (without DEV-1291's fix) and 0.11.11_beta alike: over BLE the
reads are queued, so no reply lands in the pause after a logging stop.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@JongChern
JongChern merged commit 2a5cb19 into master Oct 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant